#pragma once
#include"BRTree.h"

namespace bit 
{
    template<class K>
    class set 
    {
    public:
        struct SetKeyOfT
        {
            const K& operator()(const K& kv)
            {
                return kv;
            }
        };
        typedef typename BRTree<K, K, SetKeyOfT>::const_iterator iterator;
        typedef typename BRTree<K, K, SetKeyOfT>::const_iterator const_iterator;

        iterator begin() const 
        {
            return _t.begin();
        }

        iterator end() const 
        {
            return _t.end();
        }

        pair<iterator, bool> insert(const K& key)
        {
            return _t.Insert(key);
        }

    private:
        BRTree<K, K, SetKeyOfT> _t;
    };
}
